package com.dragon.repository.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 退款表
 * </p>
 *
 * @author sy
 * @since 2024-01-09
 */
@Getter
@Setter
@TableName("dragon_refund")
public class Refund implements Serializable {

    /**
     * 主表id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 生产单id
     */
    private Integer produceId;

    /**
     * 退款标题
     */
    private String title;

    /**
     * 合同id
     */
    private Integer contractId;

    /**
     * 退款原由
     */
    private String reason;

    /**
     * 退款金额
     */
    private Double refundMoney;

    /**
     * 退款人
     */
    private Integer refundAdminId;

    /**
     * 部门id
     */
    private Integer departmentId;

    /**
     * 状态：0待审核，1通过，2不通过，3作废，4，删除
     */
    private Integer status;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;


    /**
     * 合同编码
     */
    @TableField(exist = false)
    private String contractCode;

    /**
     * 客户名称
     */
    @TableField(exist = false)
    private String customerName;


    /**
     * 退款人名称
     */
    @TableField(exist = false)
    private String refundAdminName;


    /**
     * 退货产品列表
     */
    @TableField(exist = false)
    private List<RefundProduct> refundProducts;

    /**
     * 流程数据
     */
    @TableField(exist = false)
    private List<WorkflowJson> workflowJsonList;


    /**
     * 免审字段
     */
    @TableField(exist = false)
    private Integer exempt;


}
